With rapid development, the Internet has been applied in and brought great influence to every aspect of people's daily life, work, and study. With continuous improvement of microprocessor performance and Internet infrastructure, more and more computing devices are connected to the Internet. As basic capabilities of the Internet are improved, the number of applications is increased and basic service capabilities get richer and richer. Especially, various personalized demands of people experience explosive growth. It is an irresistible trend to create various innovative applications by combining existing service capabilities. It is an essential technical means to meet personalized demands of users that a composition engine generates new applications by connecting various services in series through streamlining a script.
From the perspective of system capacity, complicated application systems and rising user groups require that a computer system where the composition engine runs possess increasingly enhanced computing power. Usually, the system capacity considered when the system is initially designed and established appears to be insufficient. If the original system is abandoned and replaced by a more powerful new system, original investment cannot be protected, therefore increasing the overall cost of the system. The increase of the system capacity generally relies on the improvement of the processing capability of computing components or the increase of the number of computing components. Over years of research and development, remarkable achievements have been made in conventional parallel processing and cluster computing technologies in terms of architecture, operating system, parallel algorithm, and programming language, effectively solving problems of system computing power and capacity expansion.
As a key technology of the cluster computing, the load balancer is widely applied. The load balancing technology mainly has features in three aspects: implementation of load balancing algorithms, health detection, and session hold. Almost all WEB application programs have session states, for example, recording whether a user logs in. Since a Hyper Text Transport Protocol (HTTP) does not have a state, the session state should be stored in a server and associated with a current browsing session of the user. In this way, when the user requests the same WEB application program page next time, the user can easily obtain the page again. When the load is balanced, an optimal choice is to distribute a particular browser session to the same server as the last time. Load balancing solutions, such as a “Cookie” insert mode in “Big-IP” and a commercial composition engine system provided by Oracle, all provide preferable cluster solutions to expand the system capacity, so as to satisfy the demand of users. Such load balancing solutions play an important role in the WEB cluster.
During the implementation of the present invention, the inventors find that the prior art at least has the following problems. The “Cookie” insert mode can solve the session hold problem based on WEB, and solve the session hold problem for requests from the same client. However, since an instance in the composition engine may come from requests of multiple clients, the method fails to solve the session hold problem of the composition engine. In addition, in the load balancing solution provided by Oracle, the load balancer at a foreground does not need to consider the session hold problem of the system, all script states are saved in a background database, and after a subsequent request enters the background database, the script state may be recovered by the database before continuing execution. However, recovery or writing of the script states in the database requires a large quantity of resources and greatly affects the system performance. Moreover, persistence and recovery need to be performed on all the states by using the database, which may cause a performance bottleneck.
Moreover, the composition engine possesses many features. Especially, in session continuity, the composition engine is different from a commonly used mechanism of the WEB applications. Therefore, the load balancing solutions in the prior art fail to meet the demand of the composition engine.